// +build ignore

package main

import (
	"fmt"
	"gopl/goroutine/link"
	"log"
	"os"
)

func main() {
	if len(os.Args) < 2 {
		fmt.Println("Usage:\n\tgo run main.go <url>")
		os.Exit(1)
	}
	urls, err := link.ExtractLinks(os.Args[1])
	if err != nil {
		log.Print(err)
		return
	}
	for _, url := range urls {
		fmt.Printf("%v\n", url)
	}
}
